home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / DYN401.ZIP / class / const.c < prev    next >
C/C++ Source or Header  |  1997-04-16  |  1KB  |  82 lines

  1.  
  2.  
  3. /*  Copyright (c) 1993-1996 Algorithms Corporation  */
  4. /*  All rights reserved.  */
  5.  
  6.  
  7.  
  8.  
  9. /*  This file automatically generated by dpp - do not edit  */
  10.  
  11. #define    DPP_STRATEGY    2
  12. #define    DPP_FASTWIDE    0
  13.  
  14.  
  15.  
  16.  
  17. #define    CLASS    Constant_c
  18. #define    ivType    Constant_iv_t
  19.  
  20. #include "generics.h"
  21.  
  22. object    Constant_c;
  23.  
  24.  
  25.  
  26. #line 21 "const.d"
  27. imeth objrtn Constant_im_gDispose(object self)
  28.  
  29.     return self; 
  30.  
  31. imeth objrtn Constant_im_gCopy(object self)
  32.     return self; 
  33.  
  34. imeth int Constant_im_gEqual(object self, object obj)
  35.     return self == obj; 
  36.  
  37.  
  38. #line 45 "const.c"
  39.  
  40. objrtn    Constant_initialize(void)
  41. {
  42.     static  CRITICALSECTION  cs;
  43.     static  int volatile once = 0;
  44.  
  45.     ENTERCRITICALSECTION(_CI_CS_);
  46.     if (!once) {
  47.         INITIALIZECRITICALSECTION(cs);
  48.         once = 1;
  49.     }
  50.     LEAVECRITICALSECTION(_CI_CS_);
  51.  
  52.     ENTERCRITICALSECTION(cs);
  53.  
  54.     if (Constant_c) {
  55.         LEAVECRITICALSECTION(cs);
  56.         return Constant_c;
  57.     }
  58.     INHIBIT_THREADER;
  59.     Constant_c = gNewClass(Class, "Constant", 0, 0, END);
  60.     iMethodFor(Constant, gDispose, Constant_im_gDispose);
  61.     iMethodFor(Constant, gEqual, Constant_im_gEqual);
  62.     iMethodFor(Constant, gGCDispose, Constant_im_gDispose);
  63.     iMethodFor(Constant, gCopy, Constant_im_gCopy);
  64.     iMethodFor(Constant, gDeepDispose, Constant_im_gDispose);
  65.     iMethodFor(Constant, gDeepCopy, Constant_im_gCopy);
  66.  
  67.     ENABLE_THREADER;
  68.  
  69.     LEAVECRITICALSECTION(cs);
  70.  
  71.     return Constant_c;
  72. }
  73.  
  74.  
  75.  
  76.